<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class CreateKmsClientsVersion extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('kms_clients_version', function (Blueprint $table) {
            $table->id();


            $table->unsignedBigInteger("clientId")->default(0)->comment("kms_clients.id");
            $table->string("version")->default("")->comment("版本号");
            $table->text("versionChangeContent")->comment("版本变更内容");
            $table->string("packageUrl")->default("")->comment("安装包地址");
            $table->string("packagingToolVersion")->default("")->comment("打包工具版本号");

            $table->unsignedInteger('createdAt')->default(0)->comment('创建时间');
            $table->unsignedInteger('createdByUid')->default(0)->comment('创建人');
            $table->unsignedInteger('updatedAt')->default(0)->comment('修改时间');
            $table->unsignedInteger('updatedByUid')->default(0)->comment('修改人');
            $table->unsignedInteger('isDeleted')->default(0)->comment('是否删除 0 - 正常 1 - 已删除');
            $table->collation = 'utf8mb4_general_ci';
            $table->comment   = 'kms - 自建应用版本信息';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('kms_clients_version');
    }
}
